<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //super,在原型攀升的问题中得到解决！！
        //在函数中攀升原型就会反复调用
        class user{
            constructor (name){
                this.name=name;
            }
            show(){
                console.log("user.show...");
            }
        }
 
        class Admin extends user{
        constructor (name){
           super(name);//继承 ,使用super 访问父类的构造器
           super.show();//调用父类的方法
        }
        }
        let a =new Admin("唐玮");
        console.log(a);
        console.dir(user);

    </script>
</body>
</html>